package com.pan.entity;

import com.pan.enumn.ComputeEnum;

import java.util.function.BiFunction;

public class Compute {

    private char sign;
    private BiFunction<Integer,Integer,Integer> calculate;

    public Compute(char sign, BiFunction<Integer, Integer, Integer> calculate) {
        this.sign = sign;
        this.calculate = calculate;
    }

    public Compute(ComputeEnum computeEnum) {
        this(computeEnum.getSign(),computeEnum.getCalculate());
    }
    public char getSign() {
        return sign;
    }

    public void setSign(char sign) {
        this.sign = sign;
    }

    public BiFunction<Integer, Integer, Integer> getCalculate() {
        return calculate;
    }

    public void setCalculate(BiFunction<Integer, Integer, Integer> calculate) {
        this.calculate = calculate;
    }
}
